--[[/**
-- * 
* 场上敌人超过N个之后 每超过一名
 * 提升（降低）[0]%伤害 [伤害万分比]
 * 
-- */]]

---@class BuffEffect382100 : BaseBuffEffect
BuffEffect382100 = ClientFight.CreateClass("BuffEffect382100", ClientFight.BaseBuffEffect)
local t = BuffEffect382100

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local list = FighterUtils.getOthersBy(buff.target, true, nil, true);
    local size = table.getn(list);
    local vilSize = math.max(size - buff.buffBean.f_BuffEffectValue[1], 0);
    if (vilSize < 0) then
    return IBuffEffect.REMOVE;
    end
    local addHurtCorrectFactor = vilSize * buff.buffBean.f_BuffEffectValue[2];
    local maxLimit = buff.buffBean.f_BuffEffectValue[3];
    if (addHurtCorrectFactor > maxLimit) then
    addHurtCorrectFactor = maxLimit;
    end
    buff.skill.parameters[FightUsingSkill.HurtCorrectFactor] = addHurtCorrectFactor;
    local logaddHurtCorrectFactor = addHurtCorrectFactor;
    SkillRoleMgr.savePathFile( "[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff:"
    .. buff.modelId .. " 增加当前技能的伤害系数: "..logaddHurtCorrectFactor);

    ClientFight.BaseBuffEffect.action(self, fight, buff, ...);

    return IBuffEffect.REMOVE;
end

t.New()